<template>
  <div>
    <!-- v-dialogDrags -->
    <el-dialog :show-close="false" :model-value="props.dialogvis"
      @update:modelValue="(val) => emits('update:dialogvis', val)" :width="props.diawidth" :style="props.diaheight"
      :close-on-click-modal="false" draggable :modal="false" overflow modal-class="dialog_class" :id="props.dioid"
      top="210px">
      <!-- body -->
      <div class="tables-container">
        <div class="tables-title">{{ props.diatitle }}</div>
        <Close class="close-btn" width="16px" height="16px" style="cursor: pointer" @click="sheclose" />
      </div>
      <div>
        <slot name="shzbody"></slot>
      </div>
      <div class="footerbtn">
        <el-button style="width: 60px; margin-top: 20px" @click="sheclose">取消</el-button>
        <el-button style="
            width: 60px;
            margin-top: 20px;
            background: #3370ff;
            color: #fff;
          " @click="shecli">确认</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script setup>
import {
  ref,
  defineProps,
  defineEmits,
  nextTick,
  onMounted,
  getCurrentInstance,
  onUnmounted,
} from "vue";
const { proxy } = getCurrentInstance();
const props = defineProps({
  dialogvis: Boolean,
  diawidth: String,
  diatitle: String,
  diaheight: {
    type: String,
    default: "height:290px" // 这里设置默认高度
  },
  dioid: String
});
const emits = defineEmits(["issheclose", "isshecli", "update:dialogvis"]);

const sheclose = () => {
  emits("issheclose");
};
const shecli = () => {
  emits("isshecli");
};

onMounted(() => { });
</script>

<style scoped>
.tables-container {
  display: flex;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.tables-title {
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.85);
}

.close-btn {}

.footerbtn {
  height: 72px;
  border-top: 1px solid rgba(232, 232, 232, 1);
  display: flex;
  justify-content: flex-end;
}

:deep(.el-dialog) {
  pointer-events: auto;
  margin-left: 75px;
}

:deep(.el-overlay-dialog) {
  z-index: 1;
}
</style>